//
//  DefaineCell.m
//  Estate
//
//  Created by heyong on 16/6/22.
//  Copyright © 2016年 ttsx. All rights reserved.
//

#import "DefaineCell1.h"

@implementation DefaineCell1

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle=UITableViewCellSelectionStyleNone;
    self.title.font=[UIFont systemFontOfSize:16.*BIZ];
    self.text.font=[UIFont systemFontOfSize:16.*BIZ];
    
    self.title.textColor=UIColorFromRGB(0x797979);
    self.text.textColor=UIColorFromRGB(0x797979);
    
}
- (void)setTitle:(NSString *)title andDetail:(NSString *)detail andLeftConstraint :(CGFloat)f{
    self.title.text=title;
    self.text.text=detail;
    self.textLeadCinstraint.constant=f;
    self.title.font=[UIFont systemFontOfSize:16.*BIZ];
    self.text.font=[UIFont systemFontOfSize:16.*BIZ];
}

- (void)setTitle:(NSString *)title andDetail:(NSString *)detail{
    self.title.text=title;
    self.text.text=detail;
}

+ (CGFloat)cellHeightWithObj:(NSString *)string {
    //标题高度
    CGFloat cellHeight = 50*BIZ;
    CGFloat mWidth = [UIScreen mainScreen].bounds.size.width*0.75;
    cellHeight = [string boundingRectWithSize:CGSizeMake(mWidth,MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin  attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16.*BIZ]} context:nil].size.height+30;
    if(cellHeight<=50*BIZ){
        cellHeight=50*BIZ;
    }
    return cellHeight;
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    // Configure the view for the selected state
}

@end
